package com.sinosun.autotestmachine.tools.Collector;

import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListSet;

import com.sinosun.autotestmachine.tools.parser.FileDetail;
import com.sinosun.autotestmachine.tools.parser.GroupHolder;
import com.sinosun.autotestmachine.tools.parser.NodeDetail;
import com.sinosun.autotestmachine.tools.parser.ShareInfoDetail;
import com.sinosun.autotestmachine.tools.parser.TopicInformation;
import com.sinosun.autotestmachine.tools.proxy.callback.NotificationInfo;
import com.sinosun.autotestmachine.tools.proxy.callback.buddy.BuddyActionInformation;
import com.sinosun.mstplib.message.Message;
import com.sinosun.mstplib.vote.VoteInfo;

public class Cache {
	public static Map<String, Message> messageSendCache = new ConcurrentHashMap<String, Message>();
	public static Map<String, GroupHolder> groupInfoCache = new ConcurrentHashMap<String, GroupHolder>();
	public static Map<String, NotificationInfo> allNotification = new ConcurrentHashMap<String, NotificationInfo>();
	public static Map<String, FileDetail> allUploadFile = new ConcurrentHashMap<String, FileDetail>();
	public static Map<String, NodeDetail> allNodeId = new ConcurrentHashMap<String, NodeDetail>();
	public static Map<String, ShareInfoDetail> allSharedInfo = new ConcurrentHashMap<String, ShareInfoDetail>();
	public static Map<String, TopicInformation> allTopicInfo = new ConcurrentHashMap<String, TopicInformation>();
	public static Map<String, VoteInfo> allVoteInfo = new ConcurrentHashMap<String, VoteInfo>();
	public static Set<BuddyActionInformation> allBuddyAction = new ConcurrentSkipListSet<BuddyActionInformation>();
	
//	public static Map<String, NodeDetail> allMoveNodeId = new ConcurrentHashMap<String, NodeDetail>();
//	public static Map<String, NodeDetail> allCopyNodeId = new ConcurrentHashMap<String, NodeDetail>();
//	public static Map<String, NodeDetail> allDumpNodeId = new ConcurrentHashMap<String, NodeDetail>();
	
	public static void clearCache() {
		messageSendCache.clear();
		groupInfoCache.clear();
		allNotification.clear();
		allUploadFile.clear();
		allNodeId.clear();
		allSharedInfo.clear();
		allTopicInfo.clear();
		allVoteInfo.clear();
		allBuddyAction.clear();
		
//		allMoveNodeId.clear();
//		allCopyNodeId.clear();
//		allDumpNodeId.clear();
	}
}
